//
//  Networking.h
//  DouBan1.0
//
//  Created by Aurora on 15/11/26.
//  Copyright © 2015年 Aurora. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <AFHTTPRequestOperationManager.h>
#import <AFHTTPRequestOperationManager+RACSupport.h>
#import <AFNetworking.h>

static NSString * APIServer = @"http://pyoa.hspcn.net/";

//定义block  准备传值
typedef void (^Block) (NSData *tempData);
//Block 代表一种函数类型类型
//Block  等价于  void (^) (NSData *)



@interface Networking : AFHTTPRequestOperationManager
//声明一个方法，将post和get请求进行封装
+ (void)receiveDataWithURLString:(NSString *)string method:(NSString *)method body:(NSString *)body Block:(Block)block;
+ (instancetype)sharedManager;

- (RACSignal *)requestGetWithUrlString:(NSString *)urlString;

+ (NSDictionary *)dictionaryWithJsonString:(NSString *)jsonString;
@end
